<?php
class retrieve_forum extends retrieve_base{

	private $module_display_options 	= array();
	/**
	* function produces abstract structure of modules db structure
	*
    * used to generate the table structure required abstract function that passes an abstract
	* representation of the desired table structure to the proper database module which will
	* interpet the abstract and convert it into a valid SQL Create table structure.
	*
	* @return Array list of abstract table definitions for this module
	*/
	function create_table(){
		$tables = array();
		/**
		* Table structure for table 'group_data'
		*/
		$fields = array(
		array("forum_identifier"		,"unsigned integer"			,"NOT NULL"	,"auto_increment"),
		array("forum_client"			,"unsigned integer"			,"NOT NULL"	,"default '0'"),
		array("forum_label"				,"varchar(255)"				,"NOT NULL"	,"default ''"),
		array("forum_date_created"		,"datetime"					,"" 		,"default NULL"),
		array("forum_created_by"		,"unsigned integer"			,"NOT NULL"	,"default ''"),
		array("forum_status"			,"unsigned small integer"	,"NOT NULL"	,"default '0'"),
		array("forum_workflow"			,"unsigned small integer"	,"NOT NULL"	,"default '0'"),
		array("forum_location"			,"unsigned integer"			,"NOT NULL"	,"default '0'")
		);
		$primary ="forum_identifier";
		$tables[count($tables)] = array("forum", $fields, $primary);
		/**
		* Table structure for table 'group_access'
		*/
		$fields = array(
		array("forum_thread_identifier"	,"unsigned integer"			,"NOT NULL"	,"auto_increment"),
		array("forum_thread_forum"		,"unsigned integer"			,"NOT NULL"	,"default '0'"),
		array("forum_thread_parent"		,"unsigned integer"			,"NOT NULL"	,"default '0'"),
		array("forum_thread_starter"	,"unsigned integer"			,"NOT NULL"	,"default '0'"),
		array("forum_thread_author"		,"unsigned integer"			,"NOT NULL"	,"default '0'"),
		array("forum_thread_client"		,"unsigned integer"			,"NOT NULL"	,"default '0'"),
		array("forum_thread_status"		,"unsigned small integer"	,"NOT NULL"	,"default '0'"),
		array("forum_thread_date"		,"datetime"					,"NOT NULL"	,"default ''"),
		array("forum_thread_title"		,"varchar(255)"				,"NOT NULL"	,"default ''"),
		array("forum_thread_blocked"	,"unsigned small integer"	,"NOT NULL"	,"default '0'")
		);
		$primary ="forum_thread_identifier";
		$tables[count($tables)] = array("forum_thread", $fields, $primary);
		/**
		* Table structure for table 'pages'
		*/
		
		$fields = array(
		array("search_keyword"			,"varchar(50)"		,"NOT NULL"	,"default ''"),
		array("search_counter"			,"unsigned integer"	,"NOT NULL"	,"default '0'"),
		array("search_client"			,"unsigned integer"	,"NOT NULL"	,"default ''")
		);
		
		$primary ="";
		$tables[count($tables)] = array("forum_search_keys", $fields, $primary);
		return $tables;
	}
	/**
	* call the initialisation function only when this module is created
	*/
	function create_client_details($parameters){
	}
		

}
?>